#ifndef WEATHERNUM_H
#define WEATHERNUM_H

#include "config.h"

#if WEATHER_ICON_CHOICE == 0
  #include "img/tianqi/t0.h"
  #include "img/tianqi/t1.h"
  #include "img/tianqi/t2.h"
  #include "img/tianqi/t3.h"
  #include "img/tianqi/t4.h"
  #include "img/tianqi/t5.h"
  #include "img/tianqi/t6.h"
  #include "img/tianqi/t7.h"
  #include "img/tianqi/t9.h"
  #include "img/tianqi/t11.h"
  #include "img/tianqi/t13.h"
  #include "img/tianqi/t14.h"
  #include "img/tianqi/t15.h"
  #include "img/tianqi/t16.h"
  #include "img/tianqi/t18.h"
  #include "img/tianqi/t19.h"
  #include "img/tianqi/t20.h"
  #include "img/tianqi/t26.h"
  #include "img/tianqi/t29.h"
  #include "img/tianqi/t30.h"
  #include "img/tianqi/t31.h"
  #include "img/tianqi/t53.h"
  #include "img/tianqi/t99.h"
#elif WEATHER_ICON_CHOICE == 1
  #include "img/weather.h"
#endif

typedef enum : uint16_t
{
  QING,       // 雾
  DUO_YUN,    // 多云
  YIN,        // 阴
  ZHEN_YU,    // 阵雨
  LEI_ZHEN_YU,//雷阵雨
  LEI_ZHEN_YU_BAN_YOU_BING_BAO,// 雷阵雨伴有冰雹
  YU_JIA_XUE, //雨夹雪
  XIAO_YU,    // 小雨
  ZHONG_YU,   // 中雨
  DA_YU,      // 大雨
  BAO_YU,     // 暴雨
  DA_BAO_YU,  // 大暴雨
  TE_DA_BAO_YU,// 特大暴雨
  ZHEN_XUE,   // 阵雪
  XIAO_XUE,   // 小雪
  ZHONG_XUE,  // 中雪
  DA_XUE,     // 大雪
  BAO_XUE,    // 暴雪
  WU,         // 雾
  DONG_YU,    // 冻雨
  SHA_CHEN_BAO,               // 沙尘暴
  XIAO_DAO_ZHONG_YU,          // 小到中雨
  ZHONG_DAO_DA_YU,            // 中到大雨
  DA_DAO_BAO_YU,              // 大到暴雨
  BAO_YU_DAO_DA_BAO_YU,       // 暴雨到大暴雨
  DA_BAO_YU_DAO_TE_DA_BAO_YU, // 大暴雨到特大暴雨
  XIAO_DAO_ZHONG_XUE, // 小到中雪
  ZHONG_DAO_DA_XUE,   // 中到大雪
  DA_DAO_BAO_XUE,     // 大到暴雪
  FU_CHEN,            // 浮尘
  YANG_SHA,           // 扬沙
  QIANG_SHA_CHEN_BAO, // 强沙尘暴
  NONG_WU,            // 浓雾
  QING_NONG_WU = 49,  // 强浓雾
  MAI = 53,           // 霾
  ZHONG_DU_MAI,       // 中度霾
  ZHONG_DU_MAI_2,     // 重度霾
  YAN_ZHONG_MAI,      // 严重霾
  DA_WU,              // 大雾
  TE_QIANG_NONG_WU,   // 持强浓雾
  NONE = 99,          // 无
  YU = 301,           // 雨
  XUE                 // 雪
} weatherTpye;

class WeatherNum
{
private:
  weatherTpye _todayWeatherCode;
  weatherTpye _currentWeatherCode;
  weatherTpye _weatherCode;   // 当前屏幕上显示的weatherCode
  uint8_t _mode = 1; /* 0,显示今日天气； 1,显示实时天气*/
  const uint8_t *_pictureCode;
  uint32_t _pictureSize;

public:
  void setTodayWeatherCode(weatherTpye todayWeatherCode);
  void setCurrentWeatherCode(weatherTpye currentWeatherCode);
  void setTodayWeatherAndCurrentWeatherCode(weatherTpye todayWeatherCode, weatherTpye currentWeatherCode);
  // void printfweather(uint8_t numx, uint8_t numy, uint8_t mode);
  void setWeather(const uint8_t **weatherCode, uint32_t *weatherSize, uint8_t mode);

  uint8_t getMode();
  void switchMode();
};

#endif
